package com.suge.order.dao.impl;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.suge.order.dao.UserBizOrderDAO;
import com.suge.order.dao.dataobject.UserBizOrderDO;

public class UserBizOrderDAOImpl  extends SqlMapClientDaoSupport implements UserBizOrderDAO {

	public UserBizOrderDO getUserBizOrderByUserId(long userId) {
		return (UserBizOrderDO) this.getSqlMapClientTemplate().queryForObject("UserBizOrder.queryBizOrderByUserId",userId);
	}

	public UserBizOrderDO getUserBizOrderByUserNick(String userNick) {
		return (UserBizOrderDO) this.getSqlMapClientTemplate().queryForObject("UserBizOrder.queryBizOrderByUserNick",userNick);
	}

	public boolean updateUserBizOrderInfo(UserBizOrderDO userBizOrderDO) {
		return this.getSqlMapClientTemplate().update("UserBizOrder.updateBizOrderInfo", userBizOrderDO)>0;
	}

	public boolean insertUserBizOrderInfo(UserBizOrderDO userBizOrderDO) {
		return this.getSqlMapClientTemplate().insert("UserBizOrder.insertBizOrder", userBizOrderDO)!=null;
	}

}
